Some Experiments with Evaluation of Legendre Polynomials
نویسنده
چکیده
Common practice is to recommend evaluation of polynomials by Horner’s rule. Here’s an example where it is fast but doesn’t work nearly as accurately as another fairly easy method. Can a method for Legendre polynomials be both fast and accurate? 1 1 Legendre Polynomials A substantial literature has grown up around the uses for orthonormal polynomials. Here we look at the example of Legendre polynomials (in particular, Legendre Functions of the First Kind) usually written as Pn, which we encountered most recently in looking at formulas for Gaussian quadrature. In this case we need to evaluate them at particular points, and must choose a sequence of operations for the computation. The polynomials can be defined in various algebraically equivalent ways, but with distinct numerical-roundoff behaviors. One popular method directly uses the well-known defining recurrence (for integer n ≥ 0): Pn(x) := (2n− 1)xPn−1 − (n− 1)Pn−2 n , P0 = 1, P1 = x Another method which might occur to someone with a computer algebra system handy and interested in minimizing the operation count is to expand this expression as a polynomial in x, extract the coefficients, and use Horner’s rule. Let us try as an example, P5(x) which is 63 x − 70 x + 15 x 8 . Using Horner’s Rule it can be expressed as x ( x ( 63 x − 70 ) + 15 ) 8 or by performing the indicated division by a constant: x ( x ( 7.875 x − 8.75 ) + 1.875 ) The recurrence, on the other hand, requires following a program. Here it is expressed in Macsyma: h(x):=block([p0,p1,p2,p3,p4], p0:1, p1:x, 1We have previously observed that Chebyshev polynomials (Tn)can be calculated using a recurrence that computes Tn+m from Tn and Tm. For this, see papers by Fateman and by Koepf [1, 3].
منابع مشابه
Numerical Calculation of Fractional Derivatives for the Sinc Functions via Legendre Polynomials
This paper provides the fractional derivatives of the Caputo type for the sinc functions. It allows to use efficient numerical method for solving fractional differential equations. At first, some properties of the sinc functions and Legendre polynomials required for our subsequent development are given. Then we use the Legendre polynomials to approximate the fractional deri...
متن کاملCOMPOSITE INTERPOLATION METHOD AND THE CORRESPONDING DIFFERENTIATION MATRIX
Properties of the hybrid of block-pulse functions and Lagrange polynomials based on the Legendre-Gauss-type points are investigated and utilized to define the composite interpolation operator as an extension of the well-known Legendre interpolation operator. The uniqueness and interpolating properties are discussed and the corresponding differentiation matrix is also introduced. The appl...
متن کاملSolution of nonlinear Volterra-Hammerstein integral equations using alternative Legendre collocation method
Alternative Legendre polynomials (ALPs) are used to approximate the solution of a class of nonlinear Volterra-Hammerstein integral equations. For this purpose, the operational matrices of integration and the product for ALPs are derived. Then, using the collocation method, the considered problem is reduced into a set of nonlinear algebraic equations. The error analysis of the method is given an...
متن کامل